package com.jmga.ecogasfinder.receivers;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

import com.jmga.ecogasfinder.services.EcoStationProducerService;
import com.jmga.ecogasfinder.services.StationUpdaterService;

public class AlarmsReceiver extends BroadcastReceiver{
	final public static String ONE_TIME = "onetime";
	
	@Override
	public void onReceive(Context context, Intent intent) {
		Log.d(getClass().getName(), "Hemos recibido una alarma!!");		
		Intent stationUpdaterIntent = new Intent(context, StationUpdaterService.class);
		Intent ecoStationProducerIntent = new Intent(context, EcoStationProducerService.class);

		context.startService(stationUpdaterIntent);
		context.startService(ecoStationProducerIntent);
	}

}
